<template>
  <view class="play-rule-layout">
    <my-header title="盲盒玩法"></my-header>
    <my-content class="content">
      <rich-text :nodes="privacyData" class="privacy"></rich-text>
    </my-content>
  </view>

</template>

<script>
	import api from '../../api'
	export default {
		data() {
			return {
				privacyData:'',
				con:''
			}
		},
		onLoad(item) {
			console.log(item)
			this.con = item.content
		},
		onShow(){
			this.getContent()
		},
		
		methods: {
			getContent(){
				uni.showLoading({
					title:'数据加载中'
				})
				api.contents.show(this.con).then(res => {
					if (res.code === 200) {
						uni.hideLoading()
						this.privacyData = res.data.content
					}
				}).catch(error => {
					console.log(error)
				})
			}
		},
	}
</script>

<style lang="scss">
.play-rule-layout {
  box-sizing: border-box;
  min-height: 100vh;
  background-color: #141414;
  color: white;
  padding: 20rpx;
}
	.content {
    height: 100%;
		width: 100%;
	}
</style>